﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tauren.Business.Entity.Config;
using Input = Tauren.Business.Entity.Input;
using Global = Tauren.Business.Entity.Global;

namespace Tauren.Business.Service.UnitInfo
{
    /// <summary>
    /// 单位信息
    /// </summary>
    public interface IUnitInfoService : Base.IBaseModel
    {
        /// <summary>
        /// 删除单位信息
        /// </summary>
        /// </summary>
        /// <param name="model">单位信息实体</param>
        /// <returns></returns>
        IResponseMessage Delete(object id);

        /// <summary>
        /// 根据编码获取单位信息
        /// </summary>
        /// </summary>
        /// <param name="model">单位信息实体</param>
        /// <returns></returns>
        IResponseMessage GetByCode(string Code);
        /// <summary>
        /// 根据编码获取单位信息
        /// </summary>
        /// </summary>
        /// <param name="model">单位信息实体</param>
        /// <returns></returns>
        IResponseMessage GetByCodes(string[] Codes);


        /// <summary>
        /// 获取单个数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        IResponseMessage FirstOrDefault(object id);
        /// <summary>
        /// 获取所有数据
        /// </summary> 
        /// <returns></returns>
        IResponseMessage All();

        /// <summary>
        /// 新增数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        IResponseMessage Add(Input.Unitinfo_Input input);
        /// <summary>
        /// 编辑数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        IResponseMessage Edit(Input.Unitinfo_Input input);

        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="queryModel"></param>
        /// <returns></returns>
        IResponseMessage Pages(Global.QueryModel queryModel);

        /// <summary>
        /// 启用/禁用
        /// </summary>
        /// <param name="id"></param>
        /// <param name="enable"></param>
        /// <returns></returns>
        IResponseMessage Enable(int id);

        /// <summary>
        /// 获取字段配置
        /// </summary>
        /// <param name="PageType"></param>
        /// <returns></returns>
        IResponseMessage Config(string PageType);
        /// <summary>
        /// 获取树形结构的公司
        /// </summary>
        /// <returns></returns>
        IResponseMessage Tree();

    }
}
